<%= form_for(@message) do |f| %>
  <% if @message.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@message.errors.count, "error") %> prohibited this message from being saved:</h2>

      <ul>
      <% @message.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="fbbluebox">
  <div class="field" style="display:none;">
    <%= f.label :sender %><br />
    <%= f.text_field :sender, :value => User.find_by_id(session[:user_id]).name %>
  </div>
  <div class="field">
    <%= f.label :receiver %><br />
    <%= f.text_field :receiver, :style => 'width: 600px; height: 20px' , :title => 'Enter receivers\' names'%>
  </div>
  <div class="field">
    <%= f.label :subject %><br />
    <%= f.text_field :subject, :style => 'width: 600px; height: 20px', :title => 'Enter subject'  %>
  </div>
  <div class="field">
    <%= f.label :body %><br />
    <%= f.text_area :body, :rows => "10" , :cols => "80",  :title => 'Enter your message'%>
  </div>
 </div>

    <br />
   <div class="fbgreyboxbuttom">
    <div class="actions">
    <%= f.submit %>
  </div>
  </div>
  <br />
<% end %>
